<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        <!-- <div><strong>作者：</strong> 余华</div>
        <div><strong>书名：</strong> 活着</div> -->
    </div>
    <script>
        //******模板字符串
        // 拼接字符串
        let obj = { name: '活着', author: '余华' }

        let str = `<div><strong>作者：</strong> ${obj.author}</div>
        <div><strong>书名：</strong> ${obj.name} </div>`

        document.querySelector('div').innerHTML = str;
    </script>

</body>

</html>